package com.frcdi.qms.masterdata.domain;

import java.util.Date;

import com.frcdi.qms.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.frcdi.qms.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 变更执行对象 md_change_execution
 *
 * @author cell
 * @date 2023-09-25
 */
@ApiModel(value = "变更执行对象")
public class ChangeExecution extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long executionId;

    /** 变更申请单id */
    @Excel(name = "变更申请单编号")
    private String changeNo;

    /** 主数据变更编号 */
    @Excel(name = "主数据变更编号")
    private Long associatedId;

    /** 主数据变更名称 */
    @Excel(name = "主数据变更名称")
    private String associatedName;

    /** 主数据变更编号 */
    @Excel(name = "主数据变更类型")
    private String associatedType;

    /** 状态（0未执行,1已生效,2已驳回） */
    @Excel(name = "状态", readConverterExp = "0=未执行,1已生效,2已驳回")
    private String status;

    /** 驳回原因 */
    @Excel(name = "驳回原因")
    private String unapproveReason;

    /** 执行人 */
    @Excel(name = "执行人")
    private String executionBy;

    /** 执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date executionTime;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public void setExecutionId(Long executionId)
    {
        this.executionId = executionId;
    }

    public Long getExecutionId()
    {
        return executionId;
    }

    public String getChangeNo() {
        return changeNo;
    }

    public void setChangeNo(String changeNo) {
        this.changeNo = changeNo;
    }

    public void setAssociatedId(Long associatedId)
    {
        this.associatedId = associatedId;
    }

    public Long getAssociatedId()
    {
        return associatedId;
    }
    public void setAssociatedName(String associatedName)
    {
        this.associatedName = associatedName;
    }

    public String getAssociatedName()
    {
        return associatedName;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setUnapproveReason(String unapproveReason)
    {
        this.unapproveReason = unapproveReason;
    }

    public String getUnapproveReason()
    {
        return unapproveReason;
    }
    public void setExecutionBy(String executionBy)
    {
        this.executionBy = executionBy;
    }

    public String getExecutionBy()
    {
        return executionBy;
    }
    public void setExecutionTime(Date executionTime)
    {
        this.executionTime = executionTime;
    }

    public Date getExecutionTime()
    {
        return executionTime;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public String getAssociatedType() {
        return associatedType;
    }

    public void setAssociatedType(String associatedType) {
        this.associatedType = associatedType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("executionId", getExecutionId())
            .append("changeNo", getChangeNo())
            .append("associatedId", getAssociatedId())
            .append("associatedName", getAssociatedName())
            .append("associatedType", getAssociatedType())
            .append("status", getStatus())
            .append("unapproveReason", getUnapproveReason())
            .append("executionBy", getExecutionBy())
            .append("executionTime", getExecutionTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
